﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace TAMS.TA
{
    public partial class TA : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }


        protected void Menu1_MenuItemClick(object sender, MenuEventArgs e)
        {
            if (Menu1.SelectedValue == "Assigned Courses")
            {
                Response.Redirect("TA_Courses.aspx");
            }   else if ( Menu1.SelectedValue == "Assigned Examinations") {
                Response.Redirect("TA_Assigned.aspx");
            }   else if(Menu1.SelectedValue == "Edit Schedule") {
                Response.Redirect("TA_Schedule.aspx");
            }   else if (Menu1.SelectedValue == "Edit Contact Info")
            {
                Response.Redirect("TA_ContactInfo.aspx");
            } 
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            HttpCookie tmp = new HttpCookie("LastVisit");
            tmp.Expires = DateTime.Now.AddDays(-1);
            Response.Cookies.Add(tmp);
            Session["userName"] = null;
            Response.Redirect("../login.aspx", false);
            Context.ApplicationInstance.CompleteRequest(); 
        }
    }
}